<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Machiavel Fantasy - Inscription</title>

    <script src="js/jquery-2.1.3.min.js"></script>
    <link rel="icon" href="images/icone_site/favicon.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>>

    <!--selecteur-->
    <link rel="stylesheet" type="text/css" href="css/bootstrap-select.min.css">
    <script type="text/javascript" src="js/bootstrap-select.min.js"></script>

    <!--script info bulles-->
    <script src='js/form_info_bulles.js'></script>

    <script>
        $(document).ready(function() {
            $(function () {
                $('[data-toggle="tooltip"]').tooltip()
            });
            $(function () {
                $('[data-toggle="popover"]').popover()
            });
            //pour le selecteur
            $('.selectpicker').selectpicker();
        });
    </script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link 	href="css/complement.css" rel="stylesheet" type="text/css"/><!--CSS personnaliser-->
    <script src="js/func_verif_oubliemdp.js"></script>
</head>
<body>
<?php
            include_once("accessoires/header.html");//logo du site
            include_once("accessoires/menu.html");//barre de menu
        ?>
        <div class="col-md-2">
            <?php include_once("accessoires/calendrier_aside.php");
                   include_once("accessoires/actualite_mini.php");?>
        </div>
        <div class="col-md-8">
            <div class="panel panel-default contenu">
                <div class="panel-body">
                    <div class="col-md-offset-3 col-md-6">
                        <h3 class="underline">Mot de passe oublié</h3>
                        <?php if(!isset($page_ok)) { ?>
                        <!--Formulaire d'inscription-->
                        <form action="oublie_mdp.php" method="POST" role="form">
                            <div class="form-group has-feedback" id="form_email_user">
                                <label class="control-label" for="email_user"><b>E-mail</b> <span class="star_form">*</span></label>
                                <div class="input-group">
                                    <div class="input-group-addon">@</div>
                                    <input type="email" name="email_user" id="email_user" value="<?php if(isset($email_user)) echo $email_user; ?>" placeholder="E-mail" class="form-control" data-placement="top" data-toggle="popover" title="Entrez votre e-mail" data-content="Entrez votre adresse mail avec laquelle vous vous êtes inscrit, vous recevrez par la suite un nouveau mot de passe" />
                                </div>
                                <!--message erreur--><span id="error_email_user"></span>
                                <!--icon--><span id="input5Status" class="glyphicon form-control-feedback" aria-hidden="true"></span>
                                <?php
                                    if(!empty($errors[1]))//si vide
                                    {
                                        ?><div class="alert alert-danger alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <strong><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> </strong><?php echo $errors[1];?>
                                        </div><?php
                                    }
                                    else if(!empty($errors[2]))// si invalide
                                    {
                                        ?><div class="alert alert-danger alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <strong><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> </strong><?php echo $errors[2];?>
                                        </div><?php
                                    }
                                    else if(!empty($errors[3]))//si existe
                                    {
                                        ?><div class="alert alert-danger alert-dismissible" role="alert">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <strong><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> </strong><?php echo $errors[3];?>
                                        </div><?php
                                    }
                                ?>
                            </div>

                            <div class="form-group has-feedback" id="form_captcha">
                                <div class="input-group" style="max-width:250px;">
                                    <input type="text" name="captcha" id="captcha" value="" placeholder="recopier ici" autocomplete="off" class="form-control" />
                                    <div class="input-group-addon" ><img id="captcha_image" src="captcha/image.php" alt="image_captcha" class="img-rounded" data-toggle="tooltip" data-placement="top" title="Cliquez pour changer l'image"></div>
                                </div>
                                <?php
                                    if(!empty($errors[4]))//si vide
                                    {
                                        ?><div class="alert alert-danger alert-dismissible" role="alert" style="max-width:250px;">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <strong><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> </strong><?php echo $errors[4];?>
                                        </div><?php
                                    }
                                    else if(!empty($errors[5]))// si invalide
                                    {
                                        ?><div class="alert alert-danger alert-dismissible" role="alert" style="max-width:250px;">
                                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                        <strong><span class="glyphicon glyphicon-alert" aria-hidden="true"></span> </strong><?php echo $errors[5];?>
                                        </div><?php
                                    }
                                ?>
                            </div>
                            <input type="submit" name="envoyer" class="btn btn-success btn-sm" value=" Envoyer un nouveau mot de passe "> <a type="button" class="btn btn-default btn-xs" href="connexion.php"> Annuler </a>
                        </form>
                        <?php }else{ ?>
                            <div class="alert alert-success" role="alert">
                                <strong><span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span> </strong>Un email à été envoyer à l'adresse suivante : <i><?php echo $email_user; ?></i> avec votre nouveau mot de passe. <small>(n'oubliez pas de regarder dans vos spams.)</small> Redirection dans <span id="compteur"></span>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
		<?php 
			include_once("accessoires/chat.php");
			include_once("accessoires/footer.html");
		?>
<script type="text/javascript" src="js/compteur.js"></script>
</body>
</html>